﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace RBAC.Repository.Migrations
{
    /// <inheritdoc />
    public partial class 增加溯源表主键 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "TraceabilityId",
                table: "SlaughterEnterPrise",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "TraceabilityId",
                table: "Slaughter",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "TraceabilityId",
                table: "Packaging",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "TraceabilityId",
                table: "Health",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "TraceabilityId",
                table: "DeepEnterprises",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "TraceabilityId",
                table: "Breeds",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "TraceabilityId",
                table: "BreedEnterprise",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "TraceabilityId",
                table: "Auxiliary",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "TraceabilityId",
                table: "Additive",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "TraceabilityId",
                table: "SlaughterEnterPrise");

            migrationBuilder.DropColumn(
                name: "TraceabilityId",
                table: "Slaughter");

            migrationBuilder.DropColumn(
                name: "TraceabilityId",
                table: "Packaging");

            migrationBuilder.DropColumn(
                name: "TraceabilityId",
                table: "Health");

            migrationBuilder.DropColumn(
                name: "TraceabilityId",
                table: "DeepEnterprises");

            migrationBuilder.DropColumn(
                name: "TraceabilityId",
                table: "Breeds");

            migrationBuilder.DropColumn(
                name: "TraceabilityId",
                table: "BreedEnterprise");

            migrationBuilder.DropColumn(
                name: "TraceabilityId",
                table: "Auxiliary");

            migrationBuilder.DropColumn(
                name: "TraceabilityId",
                table: "Additive");
        }
    }
}
